package Algorithms.recursion;

/**
 * description: <br>
 * createTime: 2018/10/3111:22 <br>
 *
 * @author zzh
 */
public class CharCombination {
    public static int count(int total, int selectNumber) {
        if(selectNumber > total) {
            return 0;
        } else if(selectNumber == 1) {
            return 1;
        }else {
            return count(total - 1, selectNumber - 1) + count(total - 1, selectNumber);
        }
    }


    public static void main(String[] args) {
        System.out.println(count(5,4));
    }
}
